<?php

class MpController extends Zend_Controller_Action
{
    function init()
    {
        $this->db = Zend_Registry::get("db");
    }
    
    function preDispatch()
    {
        
    }
	
	function indexAction()
	{
		$params = $this->_request->getParams();
		
		//get posted data
    	$postStr = $GLOBALS["HTTP_RAW_POST_DATA"];
		
		if (!empty($postStr)){
			$mod_ext = new Sys_Extensions();
			$postObj = $mod_ext->TurnMsgToObj($postStr);
			
			//推送首次关注event
			if('subscribe' == $postObj->Event)
			{
				echo $mod_ext->WelcomeMsg($postObj);
			}
		}
		
		die;
	}
	
	
}